<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2019/6/14 0014
 * Time: 下午 15:29
 */

namespace frontend\widgets;


use common\models\c2\search\ActivityPlayerVoteRecordSearch;
use Yii;
use yii\base\Widget;

class VotedScroll extends Widget
{
    public $player;

    public function run()
    {
        $searchModel = new ActivityPlayerVoteRecordSearch();
        $searchModel->activity_player_id = $this->player->id;
        $searchModel->user_id = Yii::$app->user->id;
        $dataProvider = $searchModel->search(Yii::$app->request->queryParams);
        return $this->render('VotedScroll', [
            'searchModel' => $searchModel,
            'dataProvider' => $dataProvider,
        ]);
    }

    public function afterRun($result)
    {
        return parent::afterRun($result); // TODO: Change the autogenerated stub
    }

}